Promotions: changed transient name (#44857)

* Changed transient name.

* Changelog.
This commit is contained in:
And Finally 2024-02-21 17:27:34 +00:00 committed by GitHub
parent be18770859
commit 3bafb1b612
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Change promotions transient name to correspond with WC_Admin_Marketplace_Promotions::TRANSIENT_NAME.

View File

@ -558,12 +558,12 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) :
// Marketplace promotions.
if ( in_array( $screen_id, array( 'woocommerce_page_wc-admin' ), true ) ) {
$promotions = get_transient( 'wc_addons_marketplace_promotions' );
$promotions = get_transient( 'woocommerce_marketplace_promotions' );
if ( false === $promotions ) {
return;
}
wp_add_inline_script(
'wc-admin-app',
'window.wc = window.wc || {}; wc.marketplace = ' . wp_json_encode( array( 'promotions' => $promotions ) ),