MemberPress: Disable Address Fields for a Specific Membership

function mepr_disable_address_fields( $fields ) { if ( is_single( array( 12, 564 ) ) ) { $hide_fields = array( ‘mepr-address-state’, ‘mepr-address-zip’, ‘mepr-address-one’, ‘mepr-address-two’, ‘mepr-address-city’, ‘mepr-address-country’, ); foreach ( $fields as $key => $field ) { if ( isset( $field->field_key ) &&…Continue reading

SempreID Mint

require_once plugin_dir_path(__FILE__) . ‘wpcode-deps/vendor/autoload.php’; use Web3\Web3; use Web3\Contract; use Web3\Providers\HttpProvider; use Web3\RequestManagers\HttpRequestManager; use Web3\Utils; use Monolog\Logger; use Monolog\Handler\StreamHandler; use Dotenv\Dotenv; // Load environment variables from .env file $dotenv = Dotenv::createImmutable(plugin_dir_path(__FILE__) . ‘wpcode-deps’); $dotenv->load(); // Ethereum network configuration $infuraUrl = ‘https://mainnet.infura.io/v3/’…Continue reading

SempreID Mint

require_once plugin_dir_path(__FILE__) . ‘wpcode-deps/vendor/autoload.php’; use Web3\Web3; use Web3\Contract; use Web3\Providers\HttpProvider; use Web3\RequestManagers\HttpRequestManager; use Web3\Utils; use Monolog\Logger; use Monolog\Handler\StreamHandler; use Dotenv\Dotenv; // Load environment variables from .env file $dotenv = Dotenv::createImmutable(plugin_dir_path(__FILE__) . ‘wpcode-deps’); $dotenv->load(); // Ethereum network configuration $infuraUrl = ‘https://mainnet.infura.io/v3/’…Continue reading

SempreID Mint

require_once plugin_dir_path(__FILE__) . ‘wpcode-deps/vendor/autoload.php’; use Web3\Web3; use Web3\Contract; use Web3\Providers\HttpProvider; use Web3\RequestManagers\HttpRequestManager; use Web3\Utils; use Monolog\Logger; use Monolog\Handler\StreamHandler; use Dotenv\Dotenv; // Load environment variables from .env file $dotenv = Dotenv::createImmutable(plugin_dir_path(__FILE__) . ‘wpcode-deps’); $dotenv->load(); // Ethereum network configuration $infuraUrl = ‘https://mainnet.infura.io/v3/’…Continue reading

MemberPress: Pass a Member Phone Number to Stripe

function mepr_pass_phone_number_to_stripe( $args, $user ) { $phone = get_user_meta( $user->ID, ‘mepr_phone’, true ); if ( ! empty( $phone ) ) { $args[‘phone’] = $phone; } return $args; } add_filter( ‘mepr_stripe_create_customer_args’, ‘mepr_pass_phone_number_to_stripe’, 10, 2 );Continue reading

Exclude a Specific Term from the Sitemap

add_filter( ‘aioseo_sitemap_exclude_terms’, ‘aioseo_sitemap_filter_excluded_terms’, 10, 2 ); function aioseo_sitemap_filter_excluded_terms( $ids, $type ) { if ( ‘general’ === $type ) { $ids[] = 412; } return $ids; }Continue reading

Exclude a Specific Post from the Sitemap

add_filter( ‘aioseo_sitemap_exclude_posts’, ‘aioseo_sitemap_filter_excluded_posts’, 10, 2 ); function aioseo_sitemap_filter_excluded_posts( $ids, $type ) { if ( ‘general’ === $type ) { $ids[] = 614; } return $ids; }Continue reading

Append a Page to the Additional Pages Sitemap

add_filter( ‘aioseo_sitemap_additional_pages’, ‘aioseo_sitemap_add_additional_pages’ ); function aioseo_sitemap_add_additional_pages( $pages ) { $pages[] = [ ‘loc’ => ‘https://example.com/additional-page’, ‘lastmod’ => ‘2020-12-11 11:11’, ‘changefreq’ => ‘always’, ‘priority’ => (float) 1.0 ]; return $pages; }Continue reading