Running JavaScript after using WooCommerce Filter Plugin
Running JavaScript after using WooCommerce Filter Plugin
Running JavaScript after using WooCommerce Filter Plugin
I solved it by a specific css code. .col-1{ flex: 0 0 50.333333%; max-width: 50.333333%; }
Have you tried has_category? You can add a check to make sure the post has the specified category. If not then return the content un changed like below: <?php add_filter( ‘woocommerce_short_description’, ‘wpse_67108_autplay_music’ ); function wpse_67108_autplay_music( $content ) { if ( ! is_singular( ‘product’ ) && ! has_category( ‘<your specific category here>’ )) { return $content; … Read more
You could do something like this (this code has not been testedt). function schedule_sql_command($user_login, $user) { // 12 hours in seconds. $from_now = 12 * 60 * 60; // schedule a call to a custom hook passing in the user’s ID wp_schedule_single_event(time() + $from_now, ‘run_sql_command’, array( $user->ID) ); } // this is the custom hook … Read more
I don’t know where is that page located but I can help you with a practice that I do when I want to find the HTML code of a template file, Download your site (to use it locally) and then with the search tool from VS Code look for any specific class, or ID of … Read more
Finally got this working. add_action(‘before_delete_post’, ‘removeCheckDetail’, 10, 1 ); function removeCheckDetail( $order_id ) { global $woocommerce; global $wpdb; $order = new WC_Order($order_id); $order_items = $order->get_items(); // Loop through order line items foreach( $order_items as $item_id => $item ) { $url = $item->get_meta(‘Check Detail’); parse_str( parse_url( $url, PHP_URL_QUERY), $array ); $key = strstr($array[‘ck_item’], ‘”‘, true); $wpdb->check_detail … Read more
Create order actions from custom fields woocommerce
How to fetch WooCommerce products with 50% discount?
A simple solution would be creating a unique token upon purchasing a subscription/product. Save to token somewhere in database. Present the URL to the app passing the token as a GET variable. For eample, www.company.com/app/the-awesome-tool/?token=jvp2HBst5V7iHQeE2twq When accessed, check is the token is there at the database, if not restrict access. Delete the token from database … Read more
Would something like this achieve what you are after? Could be refined more by using the default read more function rather than echoing it. function add_extra_read_more_btn() { global $product; if ($product->is_purchasable()) { echo ‘<div class=”woocommerce-LoopProduct-buttons-container”>’; echo ‘<a class=”button product_type_simple” href=”‘.get_permalink($product->ID).'”>Read more</a>’; } } add_action( ‘woocommerce_after_shop_loop_item’, ‘add_extra_read_more_btn’, 9 ); function close_extra_read_more_btn_wrap() { global $product; if ($product->is_purchasable()) … Read more