Audio file’s length (duration) is missing from Attachment Details in Media Library

I’m uploading a different mp3 file to each post as an attachment and using wp_get_attachment_metadata() to print the duration of the mp3 file. Sometimes the response from wp_get_attachment_metadata() does not contain the file length and when I inspect the mp3s inside the Media Library, some of them display a length and some do not:   … Read more

Adapt shipping surcharge code

Looking to adapt the following code, so currently this adds 1% to the basket if the country is US I need £35 amount not a percentage and to only apply with Country UK and postcode BT* (all BT postcodes) add_action( 'woocommerce_cart_calculate_fees','woocommerce_custom_surcharge' ); function woocommerce_custom_surcharge() { global $woocommerce; if ( is_admin() && ! defined( 'DOING_AJAX' ) … Read more