DiZzYZA
Forum Replies Created
-
Thanks!!! it was the WPMU domain mapping plugin that had Cross-domain autologin enabled!
Forum: Networking WordPress
In reply to: Multisite Access Loggingi would think it depends on how your web server is configured. Are you using APACHE or NGINX ? How are you defining your logs.
in apache it’s usually the %v for virtualhost and in nginx it’s $host
Forum: Plugins
In reply to: [WP FullCalendar] WP FullCalendar Using CMB2 Date FieldForum: Plugins
In reply to: [WP FullCalendar] WP FullCalendar Using CMB2 Date FieldJust looked at your page. I see events in both this month and December. Did you manage to resolve?
Forum: Plugins
In reply to: [CMB2] Grab Value From Woocommerce And Use As Default Value In Cmb2 FieldThanks for your help Michael
This is what i ended up using. The value doesn’t need to change in this box only display it. It was only being used on the product backend page
Adding my field
$cmb->add_field( array( 'name' => __( 'Stock', 'cmb2' ), 'desc' => __( 'This will be populated by woocommerce stock level.', 'cmb2' ), 'id' => 'cmb2stock', 'type' => 'text', 'render_row_cb' => 'my_row_render', ) );Then in my functions.php i used this to get the value and render the row.
function my_row_render( $field_args, $field ) { $stockvalue = (int)get_post_meta($_GET['post'], '_stock' ,true); $id = $field->args( 'id' ); $label = $field->args( 'name' ); $name = $field->args( '_name' ); $value = $field->escaped_value(); $description = $field->args( 'description' ); ?> <div class="cmb-row cmb-type-text cmb2-id-cmb2stock table-layout"> <div class="cmb-th"> <label for="<?php echo $id; ?>"><?php echo $label; ?></label> </div> <div class="cmb-td"> <input id="<?php echo $id; ?>" type="text" name="<?php echo $name; ?>" value="<?php echo $stockvalue; ?>" readonly /> <p class="description"><?php echo $description; ?></p> </div> </div> <?php }Forum: Plugins
In reply to: [CMB2] Grab Value From Woocommerce And Use As Default Value In Cmb2 FieldThanks for prompt response!
Any chance of a practical example ?
- This reply was modified 9 years, 7 months ago by DiZzYZA.
Forum: Plugins
In reply to: [WP FullCalendar] WP FullCalendar Using CMB2 Date FieldGlad you got it sorted!
Forum: Plugins
In reply to: [WP FullCalendar] WP FullCalendar Using CMB2 Date FieldNo Worries
Trying to replicate your setup and changing this worked for me
$item = array ("title" => $title, "color" => $color, "start" => date('Y-m-d', $course_date), "end" => date('Y-m-d', $course_date), "url" => get_permalink($post->ID), 'post_id' => $post->ID );Also make sure this is commented out, coz it will then force to look for post date
//$where .= $wpdb->prepare(" AND post_date >= %s AND post_date < %s", $_REQUEST['start'], $_REQUEST['end']);Holding thumbs!
Forum: Plugins
In reply to: [WP FullCalendar] WP FullCalendar Using CMB2 Date FieldHey memerson
I used the $cmb_date_end and $cmb_date_start in my example above to show what kind of date format the calendar was looking for.
as my date is using unix timeCan you paste the code you do have then we can have a look?
Not sure why$post_date = get_post_meta( $post->ID, 'Your-Custom-Field', true );doesn’t work for you
When you import are you enabling it like i have in the screenshot ?
Forum: Plugins
In reply to: [WP FullCalendar] WP FullCalendar Using CMB2 Date FieldFor those who need a fix this is how i solved it.
//These are the values i got from the calendar $cmb_date_start = '2016-07-01'; $cmb_date_end = '2016-07-30'; $args = array( 'posts_per_page' => -1, 'post_type' => 'product', 'meta_query' => array( 'relation' => 'AND', // This is default, you could skip it array( 'key' => '_test_text_date_timestamp', 'compare' => '<=', 'value' => strtotime($cmb_date_end), ), array( 'key' => '_test_text_date_timestamp', 'compare' => '>=', // Same as above 'value' => strtotime($cmb_date_start), ), ), );Add the custom args above to just before this line
$the_query = new WP_Query( $args );Then i changed the following to stop it pulling from the actual post date
$post_date = substr($post->post_date, 0, 10); $post_timestamp = strtotime($post->post_date);to this
$post_date = get_post_meta( $post->ID, '_test_text_date_timestamp', true ); $post_timestamp = date("Y-m-d", strtotime($post_date));And lastly i changed this
$item = array ("title" => $title, "color" => $color, "start" => date('Y-m-d\TH:i:s', $post_date), "end" => date('Y-m-d\TH:i:s', $post_date), "url" => get_permalink($post->ID), 'post_id' => $post->ID );to this
$item = array ("title" => $title, "color" => $color, "start" => date('Y-m-d\TH:i:s, $post_date), "end" => date('Y-m-d\TH:i:s, $post_date), "url" => get_permalink($post->ID), 'post_id' => $post->ID );Hope this helps anyone looking 🙂
Hey Arnis Arbidans
I am not using ACF with WP AllImport, and i also use the same file for manual and cron update.
I’ve also tried with all plugins disabled and only woocommerce, role based price and wp_allimport activate.
Like i said previously, if i run it manually it goes through perfectly. But the moment the exact same process runs as cron it strips all the pricing out of RBP.
Can i provide any other info ?
Any suggestions on this ?
Thanks for your response Varun
Updating to the new beta version didn’t solve it unfortunately. If i manually run the import it works 100% but if it runs with cron it doesn’t update at all and actually removes the prices set from the manual import.
here is an image of the fields i’ve saved Screenshot
If there is any other information i can provide you to help diagnose please let me know
Forum: Plugins
In reply to: [CMB2] Increment Value On Text FieldLegend!