@media only screen and (min-width: 769px) { .woocommerce-account .woocommerce-MyAccount-content, .woocommerce-account …
woocommerce
Get order ID, customer shipping and billing information from WooCommerce database (MySQL query)
SELECT p.ID as order_id, p.post_date, max( CASE WHEN pm.meta_key = '_billing_email' and p.ID = pm.post_id THEN pm.meta_value …
Get an array of variation IDs for a given product ID (all possible variations)
$product = wc_get_product( $product_id ); $variation_ids = $product->get_children(); …
Get an array of variation IDs for a given product ID (visible variations only)
$product = wc_get_product( $product_id ); $variations = $product->get_available_variations(); $variation_ids = wp_list_pluck( …
Extract data attributes from WooCommerce html tag
/** * Extraction utility to get attributes from an HTML tag. * * Example given defaults to WooCommerce "data-" attributes, but you …
Decrease Password Strength Requirements for WooCommerce
/** * Change WooCommerce required password strength. * * WooCommerce password strength requirement is determined by an integer …
Remove WooCommerce Password Strength Meter
add_action( 'wp_print_scripts', 'my_woo_remove_password_strength', 10 ); function my_woo_remove_password_strength() { …
Set user role to WordPress default role during WooCommerce checkout
add_filter( 'woocommerce_new_customer_data', 'my_custom_user_data'); function my_custom_user_data( $new_customer_data ) { …
Set custom user role during WooCommerce checkout
add_filter( 'woocommerce_new_customer_data', 'my_custom_user_data'); function my_custom_user_data( $new_customer_data ) { …