// This code snippet is run when a Profile Builder user profile is successfully updated, it: // – checks if the business_name field matches a vendor post title a vendor profile claim request is sent to the ‘Vendor Claims’ admin…Continue reading
// This code snippet is run when a Profile Builder user profile is successfully updated, it: // – checks if the business_name field matches a vendor post title a vendor profile claim request is sent to the ‘Vendor Claims’ admin…Continue reading
// This code snippet creates an admin page for managing vendor profile claims. // It allows administrators to approve or deny claims, which updates the ownership of vendor posts accordingly. // The Vendor Claims page displays pending claims and provides…Continue reading
function vendor_claim_admin_menu() { add_menu_page( ‘Vendor Claims’, ‘Vendor Claims’, ‘manage_options’, ‘vendor-claims’, ‘vendor_claims_page’, ‘dashicons-businessman’, 30 ); } add_action(‘admin_menu’, ‘vendor_claim_admin_menu’); function vendor_claims_page() { global $wpdb; $claims = $wpdb->get_results(“SELECT post_id, meta_value as user_id FROM {$wpdb->postmeta} WHERE meta_key = ‘pending_claim_by_user’”); echo ‘ Vendor Claims ‘;…Continue reading
// Código PHP echo “Entrada a Conexión de la BD\n”; // Database hostname define(‘DBHOST’, ‘localhost:3306’); // Database username define(‘DB_USER’, ‘wp_j4cbx’); // Database password define(‘DB_PASSWORD’, ‘uDFmf0E~?a2YgVj0’); // Nombre de la BD define( ‘DB_NAME’, ‘wp_n5p5f’); $conexion = mysqli_connect(DBHOST, DB_USER, DB_PASSWORD, DB_NAME); echo…Continue reading
/** * Ensure Customer Subscriptions are available in the payment confirmation data. */ add_filter( ‘simpay_payment_confirmation_data’, function( $payment_confirmation_data ) { $subscriptions = \SimplePay\Core\API\Subscriptions\all( array( ‘customer’ => $payment_confirmation_data[‘customer’]->id, ‘limit’ => 1, ‘status’ => ‘all’, ‘expand’ => array( ‘data.latest_invoice’, ‘data.latest_invoice.payment_intent’, ), ), $payment_confirmation_data[‘form’]->get_api_request_args()…Continue reading
/** * Start Remove Autofill Checkout **/ add_filter(‘woocommerce_checkout_get_value’, ‘prefix_return_empty_checkout’, 10, 2); function prefix_return_empty_checkout($value, $key) { // List of fields to clear $fields_to_clear = array( ‘billing_first_name’, ‘billing_last_name’, ‘billing_company’, ‘billing_country’, ‘billing_address_1’, ‘billing_address_2’, ‘billing_city’, ‘billing_state’, ‘billing_postcode’, ‘billing_phone’, ‘billing_email’, ‘shipping_first_name’, ‘shipping_last_name’, ‘shipping_company’, ‘shipping_country’, ‘shipping_address_1’,…Continue reading
function custom_admin_css_for_posts_list() { global $pagenow; // Check if we are on the posts listing page if ($pagenow == ‘edit.php’ && (empty($_GET[‘post_type’]) || $_GET[‘post_type’] == ‘post’)) { wp_register_style(‘custom_wp_admin_css’, false); wp_enqueue_style(‘custom_wp_admin_css’); $custom_css = ” #title { width: 400px !important; /* Adjust the…Continue reading