This file contains hidden or 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 | |
| //send and display response data from an api or webhook | |
| add_action('wpcf7_before_send_mail', 'send_to_api_webhook', 10, 3); | |
| function send_to_api_webhook($contact_form, &$abort, $submission) | |
| { | |
| // replace your-subject with your form field | |
| $get_input_user = $submission->get_posted_data('your-subject'); |
This file contains hidden or 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 | |
| function wpcb_should_override_backorder( $product ) { | |
| //Set the product categories in the array | |
| $categories = array('cat-a', 'cat-b'); | |
| return has_term( $categories, 'product_cat' ) && $product->get_attribute('pa_attr-a'); | |
| } |
This file contains hidden or 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 | |
| add_action('wp', function () { | |
| if (is_singular('page')) { | |
| add_action('wp_head', function () { | |
| $JS = <<<EOD | |
| <script> | |
| alert('test'); | |
| </script> | |
| EOD; |
This file contains hidden or 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
| jQuery(document).ready(function () { | |
| var tzs = [ | |
| 'Europe/Andorra', | |
| 'Asia/Dubai', | |
| 'Asia/Kabul', | |
| 'Europe/Tirane', | |
| 'Asia/Yerevan', | |
| 'Antarctica/Casey', | |
| 'Antarctica/Davis', |