JMan
Forum Replies Created
-
Forum: Plugins
In reply to: [AMP] Google tag manage not loading, Console errorsAfter adding tags in the Google AMP container in tag manager, it started working
Forum: Plugins
In reply to: [WooCommerce] Specify price suffix per productSomeone shared custom fields with me, how it works and so on. Helped for this
Forum: Plugins
In reply to: [WooCommerce] Specify price suffix per productThank you for this but im not quite sure how I would be able to add multiple ones for different products, I tried duplicating it but that doesn’t work, so one for “price per kg” and then other products for “price per 500g”
I did the below which throws an error.
add_filter( ‘woocommerce_get_price_html’, ‘conditional_price_suffix’, 20, 2 );
function conditional_price_suffix( $price, $product ) {
// HERE define your product categories (can be IDs, slugs or names)
$my_array = array( ‘4859, 5770, 5764, 5753, 5748’ );if( in_array( $product->get_id(), $my_array ) )
$price .= ‘ ‘ . __(‘per kg’);return $price;
}add_filter( ‘woocommerce_get_price_html’, ‘conditional_price_suffix’, 20, 2 );
function conditional_price_suffix( $price, $product ) {
// HERE define your product categories (can be IDs, slugs or names)
$my_array = array( ‘2574, 1745, 5986, 5257, 5874’ );if( in_array( $product->get_id(), $my_array ) )
$price .= ‘ ‘ . __(‘per 500g’);return $price;
}Sorted, thank you. Shows its when fine when test on https://lighthouse-ci.appspot.com/try instead of in chrome dev tools lighthouse
I have changed it and its still an issue on a different page, it wasn’t -Homepage-, it was a page and I now changed it to shop and it still doesn’t work
I am seeing the same on my site. Any feedback on this?
Also receiving a “Current page does not respond with a 200 when offline”, any idea on this?
Forum: Plugins
In reply to: [Async JavaScript] Woocommerce review block breaksDisabling the ‘remove query string’ seems to have solved it
Still happening, not sure why it worked for a bit.
I add the api-fetch.min.js to do not minify and cache under the JS option.
https://ibb.co/KxLFfZSPlease check again. I removed it earlier as it was broken. I have added it now for you to take a look.
wc/blocks/products/reviews?order=desc&orderby=date_gmt&per_page=10&offset=0&category_id=19&_locale=user 404
I will take a look at the keycdn