if ( class_exists( ‘WooCommerce’ ) ) { add_action( ‘init’, function() { if ( isset( $_GET[‘clear-cart’] ) && $_GET[‘clear-cart’] === ‘true’ ) { if ( WC()->cart ) { WC()->cart->empty_cart(); } // Remove ?clear-cart=true from URL $clean_url = remove_query_arg( ‘clear-cart’ ); wp_safe_redirect(…Continue reading
if ( class_exists( ‘WooCommerce’ ) ) { // Add field add_filter( ‘woocommerce_shipping_fields’, function( $fields ) { $fields[‘shipping_phone’] = array( ‘label’ => __( ‘Phone (For Delivery Tracking SMS)’, ‘woocommerce’ ), ‘required’ => false, ‘class’ => array( ‘form-row-wide’ ), ‘priority’ => 120,…Continue reading
if ( class_exists( ‘WooCommerce’ ) ) { add_filter( ‘woocommerce_ship_to_different_address_checked’, function( $checked ) { $checkout = WC()->checkout(); if ( ! $checkout ) { return $checked; } $shipping_first = $checkout->get_value( ‘shipping_first_name’ ); $shipping_last = $checkout->get_value( ‘shipping_last_name’ ); $shipping_addr_1 = $checkout->get_value( ‘shipping_address_1’ );…Continue reading
/** * Initialize custom meta fields for Audio > Speakers products. * * Applies to product_cat slugs: * – speakers * – full-range * – subwoofers * – monitors * – line-array * * Change the slugs in $speaker_category_slugs if…Continue reading
/** * Initialize custom meta fields for Lighting > Lighting Fixtures products. * * Applies to product_cat slugs: * – lighting-fixtures (parent Lighting Fixtures) * – followspots * – pars * – wash-lights * – dj-lights * – uplights *…Continue reading
add_action( ‘init’, function () { // Only run if TEC/tribe() container exists. if ( ! function_exists( ‘tribe’ ) ) { return; } /* Disable Zoom provider actions */ $zoom_provider = tribe( \Tribe\Events\Virtual\Meetings\Zoom_Provider::class ); if ( $zoom_provider instanceof \Tribe\Events\Virtual\Meetings\Zoom_Provider ) {…Continue reading
/** * Plugin Name: MarketKing Vendor Dashboard Name Order Snippet * Description: Changes name display order in MarketKing vendor dashboard from “firstname lastname” to “lastname firstname” in all areas * Version: 1.0.0 * Author: Custom Snippet * * Instructions: *…Continue reading
LOGIN REGISTRATIONContinue reading
LOGIN REGISTRATIONContinue reading