How remove trashed WooCommerce orders from wc_get_orders() result?

Use Wp_Query instead it will give you the option to get data with status. $args = array( ‘post_type’ => ‘shop_order’, ‘posts_per_page’ => ‘-1’, ‘post_status’ => array(‘publish’, ‘pending’, ‘draft’, ‘auto-draft’, ‘future’,’private’, ‘inherit’, ‘trash’) ); $my_query = new WP_Query($args); $orders = $my_query->posts; echo “<pre>”; print_r($orders); echo “</pre>”; it will display All of your order. hope this will … Read more

wordpress frontend editor to add extra css to website

I think it’s worth studying how other plugins work, for example: Visual Composer. The logic that came into my head, is to pick the element selector clicked with jQuery, and work on it. Read this that may help you: https://stackoverflow.com/questions/5706837/get-unique-selector-of-element-in-jquery Following this logic, if each page element has the same class, it will be easier … Read more

Creating a functionality plugin to edit seriously simple podcasting

This is what the ssp_feed_item_itunes_summary filter is for. It lets you change that value through a separate plugin/function. You can read more about filters here. So rather than making the edit you’ve made, add a filter to ssp_feed_item_itunes_summary: function wpse_326975_itunes_summary( $itunes_summary, $post_id ) { $itunes_summary = get_the_excerpt( $post_id ); return $itunes_summary; } add_filter( ‘ssp_feed_item_itunes_summary’, ‘wpse_326975_itunes_summary’, … Read more

Can’t upload CSV file to plugin directory using custom upload form in admin panel

I don’t know what the reason you upload a file to the plugin directory. The standard way to upload a file is to the WordPress uploads directory. In your code, I find this one is wrong $uploadPath = $currentDir . $uploadDirectory . basename($fileName); See, you merge two path together. Try $uploadPath = $uploadDirectory . basename($fileName); … Read more