Skip to content

Commit

Permalink
chore(donate): place modal checkout behind RAS flag (#1382)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelpeixe authored Mar 1, 2023
1 parent f877408 commit 0e7165b
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@ class Newspack_Blocks_Donate_Renderer {
* Constructor.
*/
public function __construct() {
add_action( 'wp_enqueue_scripts', [ __CLASS__, 'enqueue_modal_checkout_scripts' ] );
add_action( 'wp_footer', [ __CLASS__, 'render_modal_checkout_markup' ] );
add_filter( 'woocommerce_get_return_url', [ __CLASS__, 'woocommerce_get_return_url' ], 10, 2 );
add_action( 'template_include', [ __CLASS__, 'get_modal_checkout_template' ] );
add_filter( 'wc_get_template', [ __CLASS__, 'wc_get_template' ], 10, 2 );
add_filter( 'woocommerce_checkout_fields', [ __CLASS__, 'woocommerce_checkout_fields' ] );
add_filter( 'woocommerce_checkout_get_value', [ __CLASS__, 'woocommerce_checkout_get_value' ], 10, 2 );
add_filter( 'show_admin_bar', [ __CLASS__, 'show_admin_bar' ] );
if ( defined( 'NEWSPACK_EXPERIMENTAL_READER_ACTIVATION' ) && NEWSPACK_EXPERIMENTAL_READER_ACTIVATION ) {
add_action( 'wp_enqueue_scripts', [ __CLASS__, 'enqueue_modal_checkout_scripts' ] );
add_action( 'wp_footer', [ __CLASS__, 'render_modal_checkout_markup' ] );
add_action( 'template_include', [ __CLASS__, 'get_modal_checkout_template' ] );
add_filter( 'wc_get_template', [ __CLASS__, 'wc_get_template' ], 10, 2 );
add_filter( 'show_admin_bar', [ __CLASS__, 'show_admin_bar' ] );
add_filter( 'woocommerce_checkout_get_value', [ __CLASS__, 'woocommerce_checkout_get_value' ], 10, 2 );
add_filter( 'woocommerce_get_return_url', [ __CLASS__, 'woocommerce_get_return_url' ], 10, 2 );
}
}

/**
Expand Down

0 comments on commit 0e7165b

Please sign in to comment.