dashboard widget form not submit mails

There are three issues I see in your code: Your form doesn’t have an action set. You should add it and set the value to admin-post.php. <form method=”POST” action=”<?php echo esc_url( admin_url( ‘admin-post.php’ ) ); ?>”> Because the function which processes the form and then sends the email is hooked to admin_post_submit_support_ticket (i.e. admin_post_<action>) and … Read more

How to use Datatable with Ajax when creating plugin on WordPress?

Solution to my own problem: Enqueue your custom file.js and localize admin-ajax.php. index.php function script_enqueue() { // Register the JS file with a unique handle, file location, and an array of dependencies wp_register_script(“dt_csc”, plugin_dir_url(__FILE__). ‘js/cdt.js’, array(‘jquery’)); // localize the script to your domain name, so that you can reference the url to admin-ajax.php file easily … Read more

SimpleXML is not working with xml response from external api

And according to your output SimpleXMLElement Object ( [Inventory] => SimpleXMLElement Object ( [Product] => TestProduct [ProductInventories] => SimpleXMLElement Object ( [ProductInventory] => SimpleXMLElement Object ( [Site] => 101 [QuantityInStock] => 238.00000 [QuantityHardAllocated] => 0.00000 [QuantitySoftAllocated] => 0.00000 ) ) ) ) You have to access your variable inside object parsed from this XML as: … Read more