Post sorting and ordering function in WordPress Admin is broken and always shows post from oldest to newest
This has been solved, the problem was no space left on disk, lol, sorry!
This has been solved, the problem was no space left on disk, lol, sorry!
Sure, there are activation and deactivation hooks. See: https://developer.wordpress.org/plugins/plugin-basics/activation-deactivation-hooks/ <?php register_deactivation_hook( __FILE__, ‘wpse_deactivate_myplugin’ ); function wpse_deactivate_myplugin() { // Delete the file and do any other cleanup needed here. }
Escaping depends on two things: what your variable contains, and what its container is. What the variable contains means – is it a URL? A string? JS? and so forth. What its container means – is it an attribute? Is it enclosed between two HTML tags? and so forth. Assuming your variable $wfam_woocommerce_active is a … Read more
Example of a function to remove post category from the home page. function exclude_category_home( $query ) { if ( $query->is_home ) { $query->set( ‘cat’, ‘-5, -34’ ); } return $query; } add_filter( ‘pre_get_posts’, ‘exclude_category_home’ ); Replace the category ID with the one you want to exclude. Add to functions.php of your child theme.
Rather than update the database you could write a mu-plugin to intercept reads from the active_plugins option, e.g. function option_active_plugins_akismet_or_yoast( $plugins ) { if ( !defined(‘WP_ADMIN’) ) { $hour = getdate()[ ‘hours’ ]; if ( $hour >= 10 && $hour < 19 ) { $to_remove=”wordpress-seo/wp-seo.php”; } else { $to_remove=”akismet/akismet.php”; } $remove_index = array_search( $to_remove, $plugins … Read more
You have two options. You can use the hook woocommerce_before_thankyou hook to add some html before “Obrigado. Seu pedido foi recebido” or you can replace the that thankyou text with any html you want with the hook woocommerce_thankyou_order_received_text If you want to use woocommerce_before_thankyou (NOTE: this hook will fire also on failed orders, but you … Read more
All Credit to the following post goes to Abid Omar. The full tutorial can be found on Tuts+: A Guide to the WordPress HTTP API: Automatic Plugin Updates View Plugin On Github The gist is to create a new class which will post an external file ( API ) and return plugin to download if … Read more
This could be from a number of plugins, including WPForms, RankMath, and Woocommerce — it is the Action Scheduler, something that is included in them, originally made by Woocommerce. What I’d suggest is, if you are able, search your codebase, especially your plugin files, for an instance of actionscheduler — and see what comes up.
thanks… I dont know if is this good way, but this code in the child theme functions.php is working for me: add_filter(‘woocommerce_product_class’, ‘myFunction’, 10, 4); function myFunction($classname, $product_type, $post_type, $product_id) { $classname=”SUB_WC_Product_my”; return $classname; } class SUB_WC_Product_my extends SUB_WC_Product { public function get_product_price( $context=”view” ) { return “AB”; } }
How to debug periodic performance issue