$ docker
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
| function connormagyar_override_ctct_label( $args, $key, $value ) { | |
| if ( 'customer_newsletter_opt_in' !== $key ) { | |
| return $args; | |
| } | |
| $args['label'] = 'SOME CUSTOM LABEL'; | |
| return $args; | |
| } | |
| add_filter( 'woocommerce_form_field_args', 'connormagyar_override_ctct_label', 10, 3 ); |
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 | |
| $file = '/path/to/file.png'; | |
| $filename = basename($file); | |
| $upload_file = wp_upload_bits($filename, null, file_get_contents($file)); | |
| if (!$upload_file['error']) { | |
| $wp_filetype = wp_check_filetype($filename, null ); | |
| $attachment = array( | |
| 'post_mime_type' => $wp_filetype['type'], | |
| 'post_parent' => $parent_post_id, |
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
| sudo chown -R www-data:www-data /var/www/html/your-app |
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
| add_filter( 'wc_order_is_editable', '__return_true', 99999 ); |
NewerOlder