How To Create Google Product Review Feeds? (snippet 19)
[productId]Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
[productId]Continue reading
[Product Name] [Attribute 1] [Attribute 2]…Continue reading
/** * GSL Publication Auto-Tagger for WPCode * * Extracts keywords from teachPress publication titles and creates tags * for the tag cloud. Adds an admin page under the teachPress menu. * * WPCode Settings: * Code Type: PHP Snippet…Continue reading
add_filter( ‘woocommerce_email_order_items_args’, ‘bll_order_with_product_images’, 9999 ); function bll_order_with_product_images( $args ) { $args[‘show_image’] = true; return $args; }Continue reading
add_filter( ‘wwp_filter_wholesale_price_title_text’ , ‘my_filter_wholesale_price’, 99 , 1 ); function my_filter_wholesale_price ( $titleText ) { $settingTitleText = __(‘Wholesale Price:’, ‘woocommerce-wholesale-prices-premium’); return $settingTitleText; }Continue reading
/** * Allow Shop Managers to edit and promote wholesale users. */ function wws_add_shop_manager_user_editing_capability() { $shop_manager = get_role(‘shop_manager’); if ( ! $shop_manager ) { return; } // Only add capabilities if they don’t already exist if ( ! $shop_manager->has_cap(‘edit_users’) )…Continue reading
add_filter(‘get_terms’, function ($terms, $tax, $qvars, $term_query) { if (is_shop() || is_product_category()) { global $wc_wholesale_prices_premium; if (!isset($wc_wholesale_prices_premium)) { return $terms; } $user_wholesale_role = $wc_wholesale_prices_premium->wwpp_wholesale_roles->getUserWholesaleRole(); $wholesale_role = isset($user_wholesale_role[0]) ? $user_wholesale_role[0] : ”; foreach ($terms as $key => $term) { // Ensure $term…Continue reading
function filterAddToCartLabel($actionHtml , $product , $alternate) { $actionHtml = str_replace(‘Add To Cart’, ‘Add To Order’, $actionHtml); return $actionHtml; } add_filter(‘wwof_filter_product_item_action_controls’, ‘filterAddToCartLabel’, 10, 3);Continue reading
add_filter(‘wwp_filter_wholesale_price_title_text’, ‘override_wholesale_text’, 10, 1); function override_wholesale_text($wholesaletext) { global $current_user; if (isset($current_user) && class_exists(‘WWP_Wholesale_Roles’)) { $wwp_wholesale_roles = WWP_Wholesale_Roles::getInstance(); $wwp_wholesale_role = $wwp_wholesale_roles->getUserWholesaleRole(); if (!empty($wwp_wholesale_role) && in_array(‘wholesale_customer’, $wwp_wholesale_role)) { // Where ‘wholesale_customer’ is the name of the wholesale role you want to target…Continue reading