This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('multilingualpress.taxonomies_and_terms_of', function($taxonomies,$post){ | |
foreach ($taxonomies as $key => $taxonomy) { | |
if ($taxonomy === 'product_cat') { | |
unset($taxonomies[$key]); | |
} | |
} | |
return $taxonomies; | |
},10,3); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function woocommerce_paypal_payments_gateway_icon( $icon, $id ) { | |
if ( $id === 'ppcp-gateway' ) { | |
return '<img src="https://www.paypalobjects.com/webstatic/mktg/Logo/pp-logo-100px.png" alt="PayPal Payments" />'; | |
} else { | |
return $icon; | |
} | |
} | |
add_filter( 'woocommerce_gateway_icon', 'woocommerce_paypal_payments_gateway_icon', 10, 2 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'template_redirect', 'define_default_payment_gateway' ); | |
function define_default_payment_gateway(){ | |
if( is_checkout() && ! is_wc_endpoint_url() ) { | |
$default_payment_id = 'ppcp-credit-card-gateway'; | |
WC()->session->set( 'chosen_payment_method', $default_payment_id ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.product #ppc-button { | |
display:none | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('woocommerce_paypal_payments_single_product_renderer_hook', function() { | |
return 'woocommerce_after_add_to_cart_form'; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.product #ppcp-messages { | |
display:none | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
woocommerce_paypal_payments_checkout_button_renderer_hook | |
woocommerce_paypal_payments_checkout_dcc_renderer_hook | |
woocommerce_paypal_payments_pay_order_dcc_renderer_hook | |
woocommerce_paypal_payments_proceed_to_checkout_button_renderer_hook | |
woocommerce_paypal_payments_mini_cart_button_renderer_hook | |
woocommerce_paypal_payments_single_product_renderer_hook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('multilingualpress.metabox_after_relate_posts', function($context, $request) { | |
// get post meta value from source site | |
$ProductFeedELITEGtinValue = (string)$request->bodyValue( | |
'_woosea_gtin', | |
INPUT_POST, | |
FILTER_SANITIZE_STRING | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Inpsyde\MultilingualPress\TranslationUi\Post\RelationshipContext; | |
add_action('multilingualpress.metabox_after_update_remote_product', | |
static function(RelationshipContext $context, WC_Product $remoteProduct, WC_Product $sourceProduct) { | |
$remoteSku = $remoteProduct->get_sku() ?? ''; | |
$remotePrice = $remoteProduct->get_price() ?? ''; | |
if (!empty($remoteSku) && !empty($remotePrice)) { | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'init', 'remove_woothemes_updater_notice' ); | |
/** | |
* Remove the undismissable admin notice to install/activate the WooThemes Helper plugin. | |
*/ | |
function remove_woothemes_updater_notice() { | |
remove_action( 'admin_notices', 'woothemes_updater_notice' ); | |
} |
OlderNewer