Third Party Shipping Methods

//Change “shipping” to “Express Shipping” /* * add_filter( ‘woocommerce_shipping_package_name’, ‘custom_shipping_package_name’ ); function custom_shipping_package_name( $name ) { if ( current_user_can( ‘um_third-parties’ ) ) { return ‘Express Shipping’; } } */ // Remove shipping method title add_filter( ‘woocommerce_cart_shipping_method_full_label’, ‘bbloomer_remove_shipping_label’, 9999, 2 );…Continue reading

3rd Party Checkout Page Change 1

//Change the ‘Billing details’ checkout label to ‘Contact Information’ function wc_billing_field_strings( $translated_text, $text, $domain ) { switch ( $translated_text ) { case ‘Billing details’ : $translated_text = __( ‘Credit Card Address’, ‘woocommerce’ ); break; } return $translated_text; } function custom_override_checkout_fields(…Continue reading

Third Party – Additional User Fields

function mysite_custom_define() { $custom_meta_fields = array(); $custom_meta_fields[‘billtorecnum’] = ‘billToRecNum’; return $custom_meta_fields; } function mysite_columns($defaults) { $meta_number = 0; $custom_meta_fields = mysite_custom_define(); foreach ($custom_meta_fields as $meta_field_name => $meta_disp_name) { $meta_number++; $defaults[(‘mysite-usercolumn-‘ . $meta_number . ”)] = __($meta_disp_name, ‘user-column’); } return $defaults;…Continue reading

Third Party Payment Methods

// Enable Payment on account for third parties only (using cheque method) // Set available payment methods, based on category of products in cart add_filter( ‘woocommerce_available_payment_gateways’, ‘unset_gateway_by_category’ ); function unset_gateway_by_category( $available_gateways ) { if ( is_admin() ) return $available_gateways; if…Continue reading

تغيير عمله

/** * Change a currency symbol */ add_filter(‘woocommerce_currency_symbol’, ‘change_existing_currency_symbol’, 10, 2); function change_existing_currency_symbol( $currency_symbol, $currency ) { switch( $currency ) { case ‘مصري’: $currency_symbol = ‘جنيه’; break; } return $currency_symbol; }Continue reading

Fix LearnPress conflict that hides AIOSEO tabs on settings pages

add_filter( ‘learnpress/admin/can-load-assets/lp-admin’, ‘aioseoDontLoadLearnPress’, 10, 2 ); add_filter( ‘learnpress/admin/can-load-assets/lp-admin-notice’, ‘aioseoDontLoadLearnPress’, 10, 2 ); function aioseoDontLoadLearnPress( $canLoad, $currentPage ) { if ( false === strpos( $currentPage, ‘aioseo’ ) ) { return $canLoad; } return false; }Continue reading

Noindex & Nofollow Posts

add_filter( ‘aioseo_robots_meta’, ‘aioseo_filter_robots_meta’ ); function aioseo_filter_robots_meta( $attributes ) { if ( is_singular() ) { $attributes[‘noindex’] = ‘index’; $attributes[‘nofollow’] = ‘nofollow’; } return $attributes; }Continue reading