This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Article/tutoriel complet sur https://mosaika.fr/astuces-developpement-acf/ | |
// Documentation officielle https://www.advancedcustomfields.com/resources/acf-validate_value/ | |
/** | |
* Comparer la valeur de 2 champs pour accepter/refuser leur validation | |
* Filtre : acf/validate_value | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: WooCommerce Custom Checkout Fields | |
* Description: Add some custom "emergency level" extra fields on the WooCommerce Checkout page. Save this custom data in each order metadata. | |
* Author: Pierre Saïkali | |
* Author URI: https://saika.li | |
* Text Domain: wc_ccf | |
* Domain Path: /languages/ | |
* Version: 1.0.0 | |
* Full Tutorial: https://mosaika.fr/personnaliser-tunnel-commande-woocommerce/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Mosaika; | |
/** | |
* Handle a custom 'vendor' query var to get products of a specific Vendor. | |
* Handle a custom 'featured_by_vendor' query var to get featured products of a specific Vendor. | |
* | |
* @param array $query_args - WP_Query args | |
* @param array $query_vars - WC_Product_Query args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Populate ACF select field options with Gravity Forms forms | |
*/ | |
function acf_populate_gf_forms_ids( $field ) { | |
if ( class_exists( 'GFFormsModel' ) ) { | |
$choices = []; | |
foreach ( \GFFormsModel::get_forms() as $form ) { | |
$choices[ $form->id ] = $form->title; |
OlderNewer