Changing WP_MEMORY_LIMIT doesn’t affect actual memory limit

So you’ve tried setting the WP_MEMORY_LIMIT variable in the wp-config.php file, but have you tried .user.ini or .php.ini? Create one of those files (yes, with the period in front) and then use: memory_limit=30M Or whatever value you’re looking for. By default, WordPress is set to 40mb for a single installation, and 64mb for a multisite … Read more

WooCommerce: write featured image dimensions to custom fields in product’

The key here is to use the save_post hook and have it only run the code when the post type is product (or whatever your product post type is). Here’s the code — I made the assumption that you want the full size of the featured image: add_action( ‘save_post’, ‘save_product_featured_image_dimensions’ ); function save_product_featured_image_dimensions( $post_id ) { … Read more