Duplicate Posts and Pages (copy) (copy) (copy) (copy)

// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading

Duplicate Posts and Pages (copy) (copy) (copy)

// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading

Duplicate Posts and Pages (copy) (copy)

// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading

Duplicate Posts and Pages (copy)

// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading

WP Simple Pay – Add Customer Shipping Address to Payment Metadata

/** * @link https://library.wpcode.com/snippet/m5ljwkl2/ */ add_filter( ‘simpay_get_paymentintent_args_from_payment_form_request’, function( $args, $form ) { $customer = \SimplePay\Core\API\Customers\retrieve( $args[‘customer’], $form->get_api_request_args() ); $shipping_address = $customer->shipping->address; $shipping_name = $customer->shipping->name; $shipping_phone = $customer->shipping->phone; $args[‘metadata’][‘Shipping-name’] = $shipping_name; $args[‘metadata’][‘Shipping-phone’] = $shipping_phone; foreach ( $shipping_address->toArray() as $key => $value…Continue reading