WP Simple Pay: Block Duplicate Email Addresses

/** * @link https://library.wpcode.com/snippet/ro8xmx35/ */ add_action( ‘simpay_before_payment_create’, /** * @param \WP_REST_Request WordPress REST API request. */ function( $request ) { // Retrieve form values. $fields = $request->get_param( ‘form_values’ ); $email = $fields[‘simpay_email’]; // Search for customers based on email. $customers…Continue reading

Add author name to article schema if its missing

add_filter( ‘aioseo_schema_output’, ‘add_author_name_when_missing’ ); function add_author_name_when_missing( $schema ) { if ( is_single() && ‘post’ == get_post_type() ) { global $post; $author_id = $post->post_author; $author_name = get_the_author_meta( ‘display_name’, $author_id ); foreach ( $schema as &$schemaItem ) { if ( isset($schemaItem[‘@type’]) &&…Continue reading