Add quantity of variations together and show it to parent quantity field Woocommerce
Add quantity of variations together and show it to parent quantity field Woocommerce
Add quantity of variations together and show it to parent quantity field Woocommerce
call_user_func_array() expects parameter 1 to be a valid callback, class ‘WC_Rapyd’ does not have a method ‘install’
Need help with woocommerce roles
wp_login overriding user meta data
Logo showing on some page but not on product categories pages
Here is the code: function ur_update_role( $valid_form_data, $form_id, $user_id ) { global $table_prefix; $assign_roles_list = array(); if( isset( $valid_form_data[‘billing_ie’]) && !empty( $valid_form_data[‘billing_ie’]->value ) ) { array_push( $assign_roles_list, ‘ie’ ); } if ( ! empty( $assign_roles_list ) ) { // Re-ordering roles according to priority. $user_roles_list = ur_get_default_admin_roles(); foreach ( $user_roles_list as $key => $value ) … Read more
I’ve managed to write an SQL query that would get all product variation IDs that do not have both size and color set up (not present in the wp_postmeta table). After that I just need to loop through these IDs and delete those variations using wp_delete_post. This is the query: SELECT p.ID FROM wp_posts p … Read more
You could setup a redirect at the top of the archive page template for users that don’t match your criteria, something like: $user = wp_get_current_user(); $allowed = array( ‘editor’, ‘administrator’ ); $redirect_url=”https://url-to-redirect-to”; if ( ! $user || ! array_intersect( $allowed, $user->roles ) ) { wp_safe_redirect( $redirect_url, 401 ); exit; } The check for $allowed and … Read more
Upload file to Woocommerce Order
That was a tricky one. For the user meta update to happen only on first name update you will need the following. Create a constant that will contain the current user first name Check to see if the current user first name is different from the submitted user name on profile update For the constant … Read more