Set New User Role
Set the role of users who register through the Charitable registration form shortcode.
WPForms: new smart tag - Current Unix Time
Using wp_date() function to output a Unix time where the smart tag is used.
Disallow store credits if cart has subscription product
This snippet will remove the store credit option if the cart has a subscription product
Restrict Dashboard Summary Widget
Prevent specific users (by user ID) from seeing the Easy Digital Downloads Sales Summary widget.
Non-required Card State
Makes the cart state a non-required field when present
Remove Manage Sites
Removes the Manage Sites column from the licenses table on the customer purchase history page
Show login form for logged out users
Shows the [edd_login] form on restricted content for logged out users.
Genesis theme - use block editor in widgets
//* Genesis Enable the block-based widget editor add_filter( 'use_widgets_block_editor', '__return_true' );
Child Support Calculator
function child_support_calculator_shortcode() { // Enqueue the JavaScript wp_enqueue_script('child-support-calculator', get_template_directory_uri() . '/path-to-your-js-folder/child-support-calculator.js', array('jquery'), '1.0.0', true); ob_start(); include…
Commissions as a fixed dollar amount, or fixed plus a percentage.
add_filter( 'wcv_commission_rate', 'my_wcv_custom_filter', 10, 3 ); function my_wcv_custom_filter( $commission, $product_id, $product_price ) { return WCV_Commission::get_commission_rate( $product_id…
login redirect changed from default my account page to home page
/** * WooCommerce My Account Page login Redirect */ add_action( 'wp_login', 'owp_redirect_after_logout' ); function owp_redirect_after_logout() {…
WP Simple Pay: Custom Webhook Handling Example
An example of handling the `coupon.updated` webhook event. For a full list of available events see:…
Reverse the Order of the Next & Previous Links
Reverses the order of the next and previous links so that the next link will display…
Set the Payment fields in the Sign Up form as required
Set the Payment fields in the Sign Up form as required - you can remove any…