Skip to content
Advertisement

Tag: wordpress

WordPress image size not sizing correctly

In WordPress admin, I have defined the size for medium as such: I have then uploaded an image and defined in my code to use medium $image = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), ‘medium’ ); However, the image size is being rendered at 370 x 186px. With the original size of the image being 1200 x 600. Seems like the width settings are

Allow access to any order on front-end on WooCommerce

My goal is to allow certain role to view any order in shop. While displaying all orders in “My Account” page is relatively easy, accessing particular order created by different user always ends up with “Invalid order. My account” error. So far I have added custom query on woocommerce_my_account_my_orders_query filter, so that one can view all orders made by accounts

Add minutes to time based on current time

I am trying to figure out a way to change a value based on current time, currently I am using the following code to add certain minutes the time the order is placed. which is working fine (except for $minutes_to_add = 170 is only adding only 30 minutes to the current time for some reason but I am living with

Advertisement