This commit is contained in:
Alex P. 2025-07-15 15:11:01 +03:00
parent 9a432240f5
commit 46b2b6da93
No known key found for this signature in database
GPG key ID: 68E4DCB139B18520
3 changed files with 5 additions and 1 deletions

View file

@ -1926,8 +1926,10 @@ document.querySelector("#payment").before(document.querySelector(".ppcp-messages
$variations = $product->get_available_variations( 'objects' );
$in_stock = $this->has_in_stock_variation( $variations );
}
// phpcs:disable WordPress.Security.NonceVerification.Recommended
$enable_button = ! $product->is_type( array( 'external', 'grouped' ) ) && $in_stock &&
! ( ( $product->is_type( 'subscription' ) || $product->is_type( 'variable-subscription' ) ) && ! empty( $_GET['switch-subscription'] ) );
// phpcs:enable WordPress.Security.NonceVerification.Recommended
/**
* Allows to filter if PayPal buttons/messages can be rendered for the given product.

View file

@ -121,7 +121,7 @@ class ScriptDataHandler {
true
);
wp_enqueue_script( 'ppcp-admin-settings', '', array( 'wp-i18n' ), $script_asset_file['version'] );
wp_enqueue_script( 'ppcp-admin-settings', '', array( 'wp-i18n' ), $script_asset_file['version'], true );
wp_set_script_translations(
'ppcp-admin-settings',
'woocommerce-paypal-payments',

View file

@ -85,6 +85,8 @@ class StatusReportModule implements ServiceModule, ExtendingModule, ExecutableMo
$subscription_mode_options = $c->get( 'wcgateway.settings.fields.subscriptions_mode_options' );
// Feature flag convention.
// phpcs:disable WordPress.NamingConventions.ValidHookName.UseUnderscores
$items = array(
array(
'label' => esc_html__( 'Onboarded', 'woocommerce-paypal-payments' ),