Adding Tracking Details for Advanced Shipment Tracking Plugin From Order Notes

Add this code snippet in functions.php and let me know. /* * AST: get UPS Tracking number from order note * */ add_action( ‘woocommerce_rest_insert_order_note’, ‘action_woocommerce_rest_insert_order_note’, 10, 3 ); function action_woocommerce_rest_insert_order_note( $note, $request, $true ) { //check if AST is active if ( !function_exists( ‘ast_insert_tracking_number’ ) ) return; //check if order note is for UPS if( … Read more

Dynamic subdomains for woocommerce affiliate sales but NO multisite. Is that possible?

It’s as possible/impossible as you have time/budget for. It seems achievable to me, given that I’m assuming you’re a for-profit organisation and this is generating you revenue somehow, but you might end up hacking some WordPress internals at some point. It’s a broad and subjective question, which is not ideally suited to this stackexchange, but … Read more

Getting WordPress fatal error when hitting WooCommerce API

So, after fiddling with this all week, i finally found the solution. In my original script, i asked for 99999 products with this line: $products = $woocommerce->get(‘products’, $parameters=[‘per_page’ => 99999]); I also had this function in functions.php in WP: function maximum_api_filter($query_params) { $query_params[‘per_page’][“maximum”]= 99999; return $query_params; } add_filter(‘rest_product_collection_params’, ‘maximum_api_filter’); The new changes i made to … Read more

How to add a wrapper element on image for products page

I think I solved, it was simpler than I thought remove_action( ‘woocommerce_before_shop_loop_item_title’, ‘woocommerce_template_loop_product_thumbnail’, 10); add_action( ‘woocommerce_before_shop_loop_item_title’, ‘woocommerce_template_loop_product_thumbnail’, 10); /** * WooCommerce Loop Product Thumbs **/ if ( ! function_exists( ‘woocommerce_template_loop_product_thumbnail’ ) ) { function woocommerce_template_loop_product_thumbnail() { echo “<div class=”wc-img-wrapper”>”; echo woocommerce_get_product_thumbnail(); echo “</div>”; } }