PHP Actions
A breakdown of all the PHP Actions in CartPops.
note
Please keep in mind that the CartPops API is subject to change. Before updating, please check the changelog to learn what has changed and whether you can safely upgrade.
cartpops_drawer_wrapper_start
This action is fired before the HTML Drawer wrapper starts.
🌈 Example
function my_prefix_wrapper_end() {
echo '<p>Hello world! 👋</p>';
}
add_action( 'cartpops_drawer_wrapper_start', 'my_prefix_wrapper_end' );
cartpops_drawer_wrapper_end
This action is fired after the HTML layout wrapper start. It allows to add custom HTML after the layout wrapper start.
🌈 Example
function my_prefix_wrapper_start() {
echo '<p>Hello world! 👋</p>';
}
add_action( 'cartpops_drawer_wrapper_end', 'my_prefix_wrapper_start' );
cartpops_drawer_panel_wrapper_start
This action is fired before the HTML Drawer panel wrapper starts.
🌈 Example
function my_prefix_panel_wrapper_start() {
echo '<p>Hello world! </p>';
}
add_action( 'cartpops_drawer_panel_wrapper_start', 'my_prefix_panel_wrapper_start' );
cartpops_drawer_panel_wrapper_end
This action is fired before the HTML Drawer panel wrapper ends.
🌈 Example
function my_layout_panel_wrapper_end() {
echo '<p>Hello world! </p>';
}
add_action( 'cartpops_drawer_panel_wrapper_end', 'my_prefix_panel_wrapper_end' );
cartpops_drawer_inside
This action is fired inside the HTML Drawer panel wrapper.
🌈 Example
function my_prefix_panel_wrapper_start() {
echo '<p>Hello world! </p>';
}
add_action( 'cartpops_drawer_inside', 'my_prefix_panel_wrapper_start' );
cartpops_drawer_before_checkout_button
This action is fired before the checkout button.
🌈 Example
function my_prefix_before_checkout_button() {
echo '<p>Hello world! </p>';
}
add_action( 'cartpops_drawer_before_checkout_button', 'my_prefix_before_checkout_button' );
cartpops_drawer_before_checkout_button
This action is fired after the checkout button.
🌈 Example
function my_prefix_after_checkout_button() {
echo '<p>Hello world! </p>';
}
add_action( 'cartpops_drawer_after_checkout_button', 'my_prefix_after_checkout_button' );