WooCommerce: Webhook disabled on its own

If you don’t want to fix this every time WooCommerce updates, just create a filter in your child-theme: function overrule_webhook_disable_limit( $number ) { return 999999999999; //very high number hopefully you’ll never reach. } add_filter( ‘woocommerce_max_webhook_delivery_failures’, ‘overrule_webhook_disable_limit’ );

how to use wc_create_order with subscription product

Here’s my code for creating a subscription — it took a lot of trial and error to figure it all out. Best of luck! function create_test_sub() { $email=”[email protected]”; $start_date=”2015-01-01 00:00:00″; $address = array( ‘first_name’ => ‘Jeremy’, ‘last_name’ => ‘Test’, ‘company’ => ”, ’email’ => $email, ‘phone’ => ‘777-777-777-777’, ‘address_1′ => ’31 Main Street’, ‘address_2’ => … Read more

Display Category Thumbnail and links in Woo commerce

Have did some customization. This will help you show parent and child category images. You can later customize this code as per your requirements. $taxonomyName = “product_cat”; //This gets top layer terms only. This is done by setting parent to 0. $parent_terms = get_terms($taxonomyName, array(‘parent’ => 0, ‘orderby’ => ‘slug’, ‘hide_empty’ => false)); echo ‘<ul>’; … Read more

How to show product SKU on product page

Add this to your functions.php add_action( ‘woocommerce_single_product_summary’, ‘dev_designs_show_sku’, 5 ); function dev_designs_show_sku(){ global $product; echo ‘SKU: ‘ . $product->get_sku(); } This will output the product SKU below the product title. See image below. The product SKU is VERTEX-SLVR.

Display single product attribute value on Shop page (Woocommerce)

Just use global $product then use get_attribute() method of that product object, like below- $size = $product->get_attribute( ‘pa_size’ ); And you can also get that by below code- global $product; $size = array_shift( wc_get_product_terms( $product->id, ‘pa_size’, array( ‘fields’ => ‘names’ ) ) ); Rememeber you need to use must the global $product.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)